<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>医生信息</title>
    <link rel="stylesheet" href="/hospital/Public/css/bootstrap.min.css">
    <script src="/hospital/Public/js/jquery.js"></script>
    <script src="/hospital/Public/js/bootstrap.min.js" ></script>
    <style>
        body{
            margin-top: 5px;
        }
    </style>
</head>
<body>
<div class="container col-lg-6 col-lg-push-3">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h4>医生信息</h4>
        </div>
        <ul class="list-group-item-heading">
            <h4 class="text-primary">姓名 <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </span><input type="text" id="iname" disabled="disabled" value=<?php echo ($doctor['dot_name']); ?>></h4>
        </ul>
        <ul class="list-group-item-heading">
            <h4 class="text-primary">工号 <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </span><input type="text" id="inum" value=<?php echo ($doctor['dot_number']); ?> disabled="disabled"></h4>
        </ul>
        <ul class="list-group-item-heading">
            <h4 class="text-primary">科目 <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </span><input type="text" id="imaj" disabled="disabled"  value=<?php echo ($doctor['dot_major']); ?>></h4>
        </ul>
        <br>
        <h4>值班时间表</h4>
        <table class="table" id="tb_schedule">
            <thead>
            <tr class="success">
                <th>时间</th>
                <th>上午</th>
                <th>下午</th>
            </tr>
            </thead>
            <tbody>
            <tr class="">
                <td>星期一</td>
                <td>
                    <label>
                        <input id="onem" type="checkbox" disabled="disabled" value="1">
                        9:00-11:00
                    </label>
                </td>
                <td>
                    <label>
                        <input id="onea" type="checkbox" disabled="disabled" value="2">
                        3:00-5:00
                    </label>
                </td>
            </tr>
            <tr class="">
                <td>星期二</td>
                <td>
                    <label>
                        <input id="twom" type="checkbox" disabled="disabled" value="3">
                        9:00-11:00
                    </label>
                </td>
                <td>
                    <label>
                        <input id="twoa" type="checkbox" disabled="disabled" value="4">
                        3:00-5:00
                    </label>
                </td>
            </tr>
            <tr class="">
                <td>星期三</td>
                <td>
                    <label>
                        <input id="threem" type="checkbox" disabled="disabled" value="5">
                        9:00-11:00
                    </label>
                </td>
                <td>
                    <label>
                        <input id="threea" type="checkbox" disabled="disabled" value="6">
                        3:00-5:00
                    </label>
                </td>
            </tr>
            <tr class="">
                <td>星期四</td>
                <td>
                    <label>
                        <input id="fourm" type="checkbox" disabled="disabled" value="7">
                        9:00-11:00
                    </label>
                </td>
                <td>
                    <label>
                        <input id="foura" type="checkbox" disabled="disabled" value="8">
                        3:00-5:00
                    </label>
                </td>
            </tr>
            <tr class="">
                <td>星期五</td>
                <td>
                    <label>
                        <input id="fivem" type="checkbox" disabled="disabled" value="9">
                        9:00-11:00
                    </label>
                </td>
                <td>
                    <label>
                        <input id="fivea" type="checkbox" disabled="disabled" value="10">
                        3:00-5:00
                    </label>
                </td>
            </tr>
            <tr class="">
                <td>星期六</td>
                <td>
                    <label>
                        <input id="sixm" type="checkbox" disabled="disabled" value="11">
                        9:00-11:00
                    </label>
                </td>
                <td>
                    <label>
                        <input id="sixa" type="checkbox" disabled="disabled" value="12">
                        3:00-5:00
                    </label>
                </td>
            </tr>
            <tr class="">
                <td>星期日</td>
                <td>
                    <label>
                        <input id="sevenm" type="checkbox" disabled="disabled" value="13">
                        9:00-11:00
                    </label>
                </td>
                <td>
                    <label>
                        <input id="sevena" type="checkbox" disabled="disabled" value="14">
                        3:00-5:00
                    </label>
                </td>
            </tr>

            </tbody>
        </table>
    </div>
</div>
<script type="text/javascript">

    var schedule = new Array();
    schedule[0] = <?php echo ($doctor['Mon']); ?>;
    schedule[1] = <?php echo ($doctor['Tue']); ?>;
    schedule[2] = <?php echo ($doctor['Wed']); ?>;
    schedule[3] = <?php echo ($doctor['Thu']); ?>;
    schedule[4] = <?php echo ($doctor['Fri']); ?>;
    schedule[5] = <?php echo ($doctor['Sat']); ?>;
    schedule[6] = <?php echo ($doctor['Sun']); ?>;

    setclicked(schedule[0],$('#onem'),$('#onea'));
    setclicked(schedule[1],$('#twom'),$('#twoa'));
    setclicked(schedule[2],$('#threem'),$('#threea'));
    setclicked(schedule[3],$('#fourm'),$('#foura'));
    setclicked(schedule[4],$('#fivem'),$('#fivea'));
    setclicked(schedule[5],$('#sixm'),$('#sixa'));
    setclicked(schedule[6],$('#sevenm'),$('#sevena'));

    function setclicked(schedule,a,b){
        if(schedule==1) a.attr("checked","checked");
        if(schedule==2) b.attr("checked","checked");
        if(schedule==3) {
            a.attr("checked","checked");
            b.attr("checked","checked");
        }
    }




</script>
</body>
</html>